"""
为了给构造方法更好的来进行赋值
"""


class Student:

    def __init__(self, name, age, address):
        self.name = name
        self.age = age
        self.address = address
        # print("Student类会自动打印里面的属性")

    def __str__(self):
        # print(f"打印对象的值,name is {self.name},age is {self.age},address is {self.address}")
        return f"打印对象的值,name is {self.name},age is {self.age},address is {self.address}"

    def __lt__(self, other):
        """

        :param other:
        :return:
        """
        return self.age <= other.age


stu = Student("liguang", 12, "深圳")
stu1 = Student("liguang", 12, "深圳")

# print(f"打印对象的值,name is {stu.name},age is {stu.age},address is {stu.address}")

# print(stu)
print(stu.__str__())
print(stu < stu1)
